This invention relates to computer systems, and more particularly to computer systems which provide a remainder function.
In the ensuing description of the prior systems and the present invention, the following are hereby incorporated by reference:
"Enterprise Systems Architecture/390 Principles of Operation," Order No. SA22-7201-02, available through IBM branch offices, 1994;
"IEEE standard for binary floating-point arithmetic, ANSI/IEEE Std 754-1985," The Institute of Electrical and Electronic Engineers, Inc., New York, Aug. 1985.
Computer instructions which provide the remainder that results from a division operation are known as "remainder instructions", or as "divide to integer instructions". Such instructions are useful to users of computer systems, and are required by the Institute of Electrical and Electronic Engineers (IEEE) for conformance to the IEEE standard for Binary Floating-Point Arithmetic. They are therefore present in most existing computer systems. However, the remainder instructions currently available are provided through software, and are therefore relatively slow when compared to hardware implemented instructions. If the computation could be done in hardware, a speed advantage could be realized. Moreover, current remainder instruction implementations are inefficient to the extent that much of the processing required to generate a remainder is "wasted".
In order to compute the remainder in a division operation a system must first compute the quotient of that operation. Since such quotient computations can be lengthy, such as in the case of a large dividend (the number being divided) and a small divisor (the number by which the dividend is being divided), most system designers provide interruptible quotient functions. These interruptible functions allow a remainder computation to be suspended while system processing power is dedicated to some other task. However, upon returning to the task of computing the remainder, that portion of the quotient that was previously computed is thrown away. This means that although the remainder is computed, the quotient corresponding to that remainder is lost.
It is highly desirable to have a remainder function that is capable of producing a quotient in addition to a remainder for a given division. In public-key cryptography, for example, the production of quotients consisting of hundreds and even thousands of bits is useful in encrypting and decrypting messages. Furthermore, a remainder function that provides the entire quotient may be used in conjunction with rounding mode specifications to provide the MOD and modulo functions currently featured in many high-level programming languages. By providing these functions at a lower level, both program complexity and runtime is reduced.